// **************************************************************************
// File       [ ascii.h ]
// Author     [ littleshamoo ]
// Synopsis   [ ascii character definitions ]
// Date       [ Ver. 1.0 started 2010/01/29 ]
// **************************************************************************

#ifndef _COMMON_ASCII_H_
#define _COMMON_ASCII_H_

namespace CommonNs {

// printable character range
const int ASCII_MIN_PR = 0x20;
const int ASCII_MAX_PR = 0x7e;

// control character
const int ASCII_NUL    = 0x00;  // null character            '^@'
const int ASCII_SOH    = 0x01;  // start of header           '^A'
const int ASCII_STX    = 0x02;  // start of text             '^B'
const int ASCII_ETX    = 0x03;  // end of text               '^C'
const int ASCII_EOT    = 0x04;  // end of transmission       '^D'
const int ASCII_ENQ    = 0x05;  // enquiry                   '^E'
const int ASCII_ACK    = 0x06;  // acknowledgment            '^F'
const int ASCII_BEL    = 0x07;  // bell                      '^G'
const int ASCII_BS     = 0x08;  // backspace                 '^H'
const int ASCII_HT     = 0x09;  // horizontal tab            '^I'
const int ASCII_LF     = 0x0a;  // line feed                 '^J'
const int ASCII_VT     = 0x0b;  // vertical tab              '^K'
const int ASCII_FF     = 0x0c;  // form feed                 '^L'
const int ASCII_CR     = 0x0d;  // carriage return           '^M'
const int ASCII_SO     = 0x0e;  // shift out                 '^N'
const int ASCII_SI     = 0x0f;  // shift in                  '^O'
const int ASCII_DLE    = 0x10;  // data link escape          '^P'
const int ASCII_DC1    = 0x11;  // device control 1          '^Q'
const int ASCII_DC2    = 0x12;  // device control 2          '^R'
const int ASCII_DC3    = 0x13;  // device control 3          '^S'
const int ASCII_DC4    = 0x14;  // device control 4          '^T'
const int ASCII_NAK    = 0x15;  // negative acknowledgement  '^U'
const int ASCII_SYN    = 0x16;  // synchronous idle          '^V'
const int ASCII_ETB    = 0x17;  // end of transmission block '^W'
const int ASCII_CAN    = 0x18;  // cancel                    '^X'
const int ASCII_EM     = 0x19;  // end of medium             '^Y'
const int ASCII_SUB    = 0x1a;  // substitute                '^Z'
const int ASCII_ESC    = 0x1b;  // escape                    '^['
const int ASCII_FS     = 0x1c;  // file separator            '^\'
const int ASCII_GS     = 0x1d;  // group separator           '^]'
const int ASCII_RS     = 0x1e;  // record separator          '^^'
const int ASCII_US     = 0x1f;  // unit separator            '^_'
const int ASCII_DEL    = 0x7f;  // delete                    '^?'

// printable character
const int ASCII_SPACE  = 0x20;  // space                     ' '
const int ASCII_EXCLM  = 0x21;  // exclamation mark         '?'
const int ASCII_QUOT   = 0x22;  // quotation mark            '"'
const int ASCII_HASH   = 0x23;  // hash sign                 '#'
const int ASCII_DOLLR  = 0x24;  // dollar sign               '$'
const int ASCII_PCT    = 0x25;  // percent sign              '%'
const int ASCII_AMP    = 0x26;  // ampersand                 '&'
const int ASCII_APOST  = 0x27;  // apostrophe                '''
const int ASCII_L_RND  = 0x28;  // left round bracket        '('
const int ASCII_R_RND  = 0x29;  // right round bracket       ')'
const int ASCII_ASTER  = 0x2a;  // asterisk                  '*'
const int ASCII_PLUS   = 0x2b;  // plus sign                 '+'
const int ASCII_COMMA  = 0x2c;  // comma                     ','
const int ASCII_MINUS  = 0x2d;  // minus sign                '-'
const int ASCII_DOT    = 0x2e;  // full stop                 '.'
const int ASCII_SLASH  = 0x2f;  // slash                     '/'
const int ASCII_0      = 0x30;  //                           '0'
const int ASCII_1      = 0x31;  //                           '1'
const int ASCII_2      = 0x32;  //                           '2'
const int ASCII_3      = 0x33;  //                           '3'
const int ASCII_4      = 0x34;  //                           '4'
const int ASCII_5      = 0x35;  //                           '5'
const int ASCII_6      = 0x36;  //                           '6'
const int ASCII_7      = 0x37;  //                           '7'
const int ASCII_8      = 0x38;  //                           '8'
const int ASCII_9      = 0x39;  //                           '9'
const int ASCII_COLON  = 0x3a;  // colon                     ':'
const int ASCII_SEMI   = 0x3b;  // semi-colon                ';'
const int ASCII_L_ANG  = 0x3c;  // left angle bracket        '<'
const int ASCII_EQUAL  = 0x3d;  // equal sign                '='
const int ASCII_R_ANG  = 0x3e;  // right angle bracket       '>'
const int ASCII_QUES   = 0x3f;  // question mark             '?'
const int ASCII_AT     = 0x40;  // at sign                   '@'
const int ASCII_A      = 0x41;  //                           'A'
const int ASCII_B      = 0x42;  //                           'B'
const int ASCII_C      = 0x43;  //                           'C'
const int ASCII_D      = 0x44;  //                           'D'
const int ASCII_E      = 0x45;  //                           'E'
const int ASCII_F      = 0x46;  //                           'F'
const int ASCII_G      = 0x47;  //                           'G'
const int ASCII_H      = 0x48;  //                           'H'
const int ASCII_I      = 0x49;  //                           'I'
const int ASCII_J      = 0x4a;  //                           'J'
const int ASCII_K      = 0x4b;  //                           'K'
const int ASCII_L      = 0x4c;  //                           'L'
const int ASCII_M      = 0x4d;  //                           'M'
const int ASCII_N      = 0x4e;  //                           'N'
const int ASCII_O      = 0x4f;  //                           'O'
const int ASCII_P      = 0x50;  //                           'P'
const int ASCII_Q      = 0x51;  //                           'Q'
const int ASCII_R      = 0x52;  //                           'R'
const int ASCII_S      = 0x53;  //                           'S'
const int ASCII_T      = 0x54;  //                           'T'
const int ASCII_U      = 0x55;  //                           'U'
const int ASCII_V      = 0x56;  //                           'V'
const int ASCII_W      = 0x57;  //                           'W'
const int ASCII_X      = 0x58;  //                           'X'
const int ASCII_Y      = 0x59;  //                           'Y'
const int ASCII_Z      = 0x5a;  //                           'Z'
const int ASCII_L_SQU  = 0x5b;  // left square bracket       '['
const int ASCII_B_SSH  = 0x5c;  // back slash                '\'
const int ASCII_R_SQU  = 0x5d;  // right square bracket      ']'
const int ASCII_CARET  = 0x5e;  // caret                     '^'
const int ASCII_UNDER  = 0x5f;  // underscore                '_'
const int ASCII_ACCNT  = 0x60;  // accent                    '`'
const int ASCII_a      = 0x61;  //                           'a'
const int ASCII_b      = 0x62;  //                           'b'
const int ASCII_c      = 0x63;  //                           'c'
const int ASCII_d      = 0x64;  //                           'd'
const int ASCII_e      = 0x65;  //                           'e'
const int ASCII_f      = 0x66;  //                           'f'
const int ASCII_g      = 0x67;  //                           'g'
const int ASCII_h      = 0x68;  //                           'h'
const int ASCII_i      = 0x69;  //                           'i'
const int ASCII_j      = 0x6a;  //                           'j'
const int ASCII_k      = 0x6b;  //                           'k'
const int ASCII_l      = 0x6c;  //                           'l'
const int ASCII_m      = 0x6d;  //                           'm'
const int ASCII_n      = 0x6e;  //                           'n'
const int ASCII_o      = 0x6f;  //                           'o'
const int ASCII_p      = 0x70;  //                           'p'
const int ASCII_q      = 0x71;  //                           'q'
const int ASCII_r      = 0x72;  //                           'r'
const int ASCII_s      = 0x73;  //                           's'
const int ASCII_t      = 0x74;  //                           't'
const int ASCII_u      = 0x75;  //                           'u'
const int ASCII_v      = 0x76;  //                           'v'
const int ASCII_w      = 0x77;  //                           'w'
const int ASCII_x      = 0x78;  //                           'x'
const int ASCII_y      = 0x79;  //                           'y'
const int ASCII_z      = 0x7a;  //                           'z'
const int ASCII_L_SCO  = 0x7b;  // left Scottish bracket     '{'
const int ASCII_VBAR   = 0x7c;  // vertical bar              '|'
const int ASCII_R_SCO  = 0x7d;  // right Scottish bracket    '}'
const int ASCII_TILDE  = 0x7e;  // tilde                     '~'

};

#endif